<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form th:action="@{/addHeadPhoto}" method="post" enctype="multipart/form-data" accept=".gif, .jpg, .png">
  <input type="file" name="file">
  <input type="submit" value="提交">
</form>

</body>
</html>